package com.zhijian.medical.service;

import com.zhijian.medical.entity.po.DoctorAdvice;
import com.zhijian.medical.entity.vo.request.DoctorAdviceSaveOrUpdateVo;
import com.zhijian.medical.entity.vo.request.DoctorAdviceSearchVo;
import com.zhijian.medical.entity.vo.response.DoctorAdviceVo;
import com.zhijian.medical.util.Page;

import java.util.List;

/**
 * 医嘱 业务处理层
 *
 * @author HCG
 * @version 1.0
 * @date 2023-08-06 22:11:04
 */
public interface DoctorAdviceService {

    /**
     * 主键查询
     *
     * @param id
     * @return
     */
    DoctorAdvice selectById(Long id);

    /**
     * 主键查询vo
     *
     * @param id
     * @return
     */
    DoctorAdviceVo selectVoById(Long id);

    /**
     * 按照主键删除
     *
     * @param id
     */
    void deleteById(Long id);

    /**
     * 新增
     *
     * @param doctorAdvice
     * @return
     */
    Long insert(DoctorAdvice doctorAdvice);

    /**
     * 更改
     *
     * @param doctorAdvice
     * @return
     */
    boolean update(DoctorAdvice doctorAdvice);

    /**
     * 动态修改
     *
     * @param record
     * @return
     */
    boolean updateByPrimaryKeySelective(DoctorAdvice record);

    /**
     * 总数
     *
     * @param doctorAdviceSearchVo
     * @return
     */
    Integer count(DoctorAdviceSearchVo doctorAdviceSearchVo);

    /**
     * 列表
     *
     * @param doctorAdviceSearchVo
     * @return
     */
    List<DoctorAdviceVo> selectList(DoctorAdviceSearchVo doctorAdviceSearchVo);

    /**
     * 分页查询
     *
     * @param doctorAdviceSearchVo
     * @return
     */
    Page<DoctorAdviceVo> selectPage(DoctorAdviceSearchVo doctorAdviceSearchVo);

    /**
     * 批量新增数据（MyBatis原生foreach方法）
     *
     * @param entities 实例对象列表
     * @return 影响行数
     */
    boolean insertBatch(List<DoctorAdvice> entities);

    /**
     * 执行
     *
     * @param id
     * @return
     */
    boolean execute(Long id);

    /**
     * 退回
     *
     * @param id
     * @param backReason
     * @return
     */
    boolean back(Long id, String backReason);

    /**
     * 保存
     *
     * @param doctorAdviceSaveOrUpdateVo
     * @return
     */
    boolean save(DoctorAdviceSaveOrUpdateVo doctorAdviceSaveOrUpdateVo);

    /**
     * 编辑
     *
     * @param doctorAdviceSaveOrUpdateVo
     * @return
     */
    boolean update(DoctorAdviceSaveOrUpdateVo doctorAdviceSaveOrUpdateVo);
}